<script setup>
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

onMounted(() => {
  // TODO: 检查用户登录状态
  // 如果未登录，跳转到登录页面
  // if (!isLoggedIn) {
  //   router.push('/login')
  // }
})
</script>

<template>
  <router-view />
</template>

<style>
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#app {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* 自定义 Element Plus 主题色 */
:root {
  --el-color-primary: #7c4dff;
  --el-color-primary-light-3: #9e7fff;
  --el-color-primary-light-5: #bda7ff;
  --el-color-primary-light-7: #dcd3ff;
  --el-color-primary-light-9: #f5f3ff;
}
</style>
